package com.heima.model.admin.dtos;

import lombok.Getter;

@Getter
public enum UserStatusEnum {

    UNAVAILABLE_TEMP(0, "暂时不可用"),
    UNAVAILABLE(1, "永久不可用"),
    AVAILABLE(9, "正常可用")    ;

    private int status;
    private String desc;

    UserStatusEnum(int status, String desc){
         this.status = status;
         this.desc = desc;
    }

    public static boolean isAvailable(Integer status){
        if(status == null){
            return false;
        }
        return (status == UserStatusEnum.AVAILABLE.getStatus());
    }

}

